function readtimeserie, filenames, max_line_num=max_line_num
	if(n_elements(max_line_num) eq 0) then max_line_num = 60000L
	
	t=dblarr(max_line_num)
	data=dblarr(max_line_num)
	
	count=0L
	tempstr = ''
	temp_data = 0.0D
	y=0 & m=0 & d=0 & HH=0 & MM=0 & SS=0
	for i = 0, n_elements(filenames) - 1 do begin
		openr, lun, filenames[i], /get_lun

		; neglect the # comment lines
		while ~eof(lun) do begin
			readf, lun, tempstr
			if strmid(tempstr, 0, 1) ne '#' then break
		end
		; the first non comment line(general value) is also neglected

		while ~eof(lun) do begin
			readf, lun, tempstr
			reads, tempstr, format='(I4,1x,I2,1x,I2,1x,I2,1x,I2,1x,I2, G)', y, m, d, HH, MM, SS, temp_data
			t[count]=julday(m, d, y, HH, MM, SS);
			data[count]=temp_data;
			++count
		end
		free_lun, lun
	endfor

	if count gt 0 then begin
		result = { t:t[0:count-1], data:data[0:count-1] }
	endif else begin
		result = { t:[0], data:[0] };
	endelse
	return, result
end
